/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package id3.UIs;

import javax.swing.JTree;
import javax.swing.tree.DefaultTreeModel;

/**
 *
 * @author NguyenVan
 */
public class TreePanel extends javax.swing.JPanel {

    /**
     * Creates new form TreePanel
     */
    public TreePanel() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jTree1 = new javax.swing.JTree();

        setPreferredSize(new java.awt.Dimension(800, 600));
        setLayout(new java.awt.GridLayout(1, 0, 20, 20));

        jTree1.setBackground(new java.awt.Color(255, 255, 204));
        jTree1.setFont(new java.awt.Font("Times New Roman", 1, 24)); // NOI18N
        javax.swing.tree.DefaultMutableTreeNode treeNode1 = new javax.swing.tree.DefaultMutableTreeNode("root");
        jTree1.setModel(new javax.swing.tree.DefaultTreeModel(treeNode1));
        jTree1.setAutoscrolls(true);
        jScrollPane1.setViewportView(jTree1);

        add(jScrollPane1);
    }// </editor-fold>//GEN-END:initComponents

    public void setjTree1DefaultTreeModel(DefaultTreeModel treeModel) {
        this.jTree1.setModel(treeModel);
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTree jTree1;
    // End of variables declaration//GEN-END:variables
}
